<?php
/**
 * Created by cloud-activity
 * User: Kenn
 * Date: 2017/6/8
 * Time: 下午4:17
 */

namespace App\App\Services;

/**
 * 利用providers 加载多个活动的serices，实现每个活动各自的业务独立
 * Class ActivityBaseSerices
 * @package App\App\Services
 */
class ActivityBaseService
{
    /**
     * @var array 活动分类
     */
    private $type = array(
                        'enroll'=>'投票'
                        );

    /**
     * 获取活动
     * @param $name
     * @return bool|\Illuminate\Foundation\Application|mixed
     */
    public function getInstanceof($name)
    {
        return $this->type[$name] ? app($name) : false;
    }
}
